package com.ferry.taskflow.taskFlow.nontx;

import com.hualala.supplychain.support.taskFlow.base.Task;
import com.hualala.supplychain.support.taskFlow.domain.TaskResult;
import lombok.extern.slf4j.Slf4j;

/**
 * Created by daiyong
 */
@Slf4j
public abstract class NonTxTask<RESULT> implements Task<RESULT> {


	@Override
	public void onSuccess(TaskResult taskResult, RESULT result) {
		log.info("NonTxTask execute success!, task:{}, result:{}", this.getClass().getName(), result);
	}

	@Override
	public void onFail(TaskResult taskResult, Throwable throwable) {
		log.error("NonTxTask execute fail! task:{}", this.getClass().getName(), throwable);
	}
}
